<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>P-dd: A simple example showing the result of attempting to load an invalid Xml document into the database factory</title>
</head>
<body>
<?php

ini_set( 'include_path', '../;.' );

require_once( 'include_package.php' );

include_package( 'Datasources' );
include_package( 'DatabaseModel' );
include_package( 'Xml' );
include_package( 'Renderers', true );

$oFactory = new DatabaseFactory(  new XmlFileDatasource( 'InvalidXmlDatabaseDescription.xml' ) );
$oDatabase = $oFactory->ConstructDatabase();

if ( $oFactory->Errored() ) {
	echo( '<h3>Database Construction had errors:</h3>' );
	foreach( $oFactory->GetAllErrors() as $sThisError ) {
		echo( $sThisError . '<br/>' );
	}
}

echo( HtmlDatabaseRenderer::Render(  new HtmlRendererConfiguration(), $oDatabase ) );


?>
</body>
</html>